<?php

class AdministradorController extends Controller
{

	public $layout='//Administrador/Main';

	/**
	 * Declares class-based actions.
	 */
	public function actions()
	{
		return array(
			// page action renders "static" pages stored under 'protected/views/site/pages'
			// They can be accessed via: index.php?r=site/page&view=FileName
			'page'=>array(
				'class'=>'CViewAction',
			),
		);
	}
	
	/**
     *
	 *La parte inicial, inscripcion del graduado
	 */
	public function actionIndex()
	{
		// renders the view file 'protected/views/site/index.php'
		// using the default layout 'protected/views/layouts/main.php'
		$this->render('Index');
	}
	
	/**
     *
	 *La parte inicial, inscripcion del graduado
	 */
	public function actionFormConsulta()
	{
		$this->renderPartial('FormConsulta');
	}
	 
	public function actionFormInscripcion()
	{
		$participante = Yii::app()->ClienteESB->obtenerParticipante($_POST["nroDocumento"]);
		$this->renderPartial("FormInscripcion", array("model" => $participante->ObtenerPorNroDocumentoResult->Datos
		, "Promocion" =>$participante->ObtenerPorNroDocumentoResult->DatosPromocion));
	}	
			
	/**
     *
	 *La parte inicial, inscripcion del graduado
	 */
	public function actionList()
	{
		// renders the view file 'protected/views/site/index.php'
		// using the default layout 'protected/views/layouts/main.php'
		
		$inscritos = Yii::app()->ClienteESB->ListarInscritos(null, null);
		
		//print_r($inscritos);
		
		$this->render('List', array('ListInscritos' => $inscritos->ListarInscritosResult->DDGInscrito));
	}		
}